package com.cyl.wms.controller;

import com.cyl.wms.domain.Address;
import com.cyl.wms.domain.Inventory;
import com.cyl.wms.pojo.dto.PdaData;
import com.cyl.wms.pojo.query.AddrQuery;
import com.cyl.wms.service.AddrService;
import com.cyl.wms.service.PdaService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;

/**
 * PDA用到的controller
 *
 * @author Lisi
 * @date 2023-05-05
 */
@Api("PDA接口列表")
@RestController
@RequestMapping("/wms/pda")
public class PdaController extends BaseController {
    @Autowired
    private PdaService service;

    @ApiOperation("上架或将物料(设备)与库位绑定")
    @PostMapping("/stow")
    public ResponseEntity<PdaData> stow(PdaData data) {
        return ResponseEntity.ok(service.stow(data));
    }

    @ApiOperation("拣货将物料(设备)拣出")
    @PostMapping("/pick")
    public ResponseEntity<PdaData> pick(PdaData data) {
        return ResponseEntity.ok(service.pick(data));
    }

    @ApiOperation("拣货将物料(设备)拣出")
    @PostMapping("/move")
    public ResponseEntity<PdaData> move(PdaData data) {
        return ResponseEntity.ok(service.move(data));
    }

    @ApiOperation("将物料(设备)移到检测位置")
    @PostMapping("/check")
    public ResponseEntity<PdaData> check(PdaData data) {
        return ResponseEntity.ok(service.check(data));
    }

}
